package com.zhangliang.service.impl;

import com.zhangliang.service.DemoService;
import org.apache.dubbo.config.annotation.Service;

@Service
public class DemoServiceImpl implements DemoService {
    @Override
    public String methodA() {
        try {
            Thread.sleep((long)(100 * Math.random()));  // 延时0～100ms
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodA result";
    }

    @Override
    public String methodB() {
        try {
            Thread.sleep((long)(100 * Math.random()));  // 延时0～100ms
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return "methodB result";
    }

    @Override
    public String methodC() {
        try {
            Thread.sleep((long)(100 * Math.random()));  // 延时0～100ms
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return "methodC result";
    }
}
